const mongoose = require('mongoose');//引入mongoose
const completedQuestionsSchema = new mongoose.Schema({
    // 类似
    // name: String,
    questions_id: {
        type: mongoose.SchemaTypes.ObjectId,
        ref:'questionsModel'
    },

    test_id: {
        type: mongoose.SchemaTypes.ObjectId,
        ref:'testsModel'
    },
    user_answer:String,
    user_id:{
        type: mongoose.SchemaTypes.ObjectId,
        ref:'usersModel'
    }
});

const completedQuestionsModel = mongoose.model("completedQuestionsModel", completedQuestionsSchema, "completedQuestions");
module.exports = {completedQuestionsModel};